﻿@{
    Layout = null;
}
@model ElingOA6_Admin_DSJCJ.Model.PeerReview
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>评议细则定义</title>
@Html.Partial("LoadPanelPartial")
   @if (false)
   {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
   }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/json2.js",true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)

    <script type="text/javascript">
        var a = 0;
        
        $(document).ready(function () {
            var hdjsAlert = $("#hidMessage").val();
            if (hdjsAlert != "") {
                alert(hdjsAlert);
                window.location.href = rootPath + "/Admin/PeerReviewRule/PeerReviewRuleContent";
            }

            //评议结束之后不能修改评议选项和评议细则
            var ruleOption = ASPxClientButtonEdit.Cast("RuleOption");
            var hdvisible = $("#hdvisible").val();     
            if(hdvisible =="true"){
                ruleOption.SetEnabled(false);
                $("#div2").hide();
                $("#div3").show();
            }

            var hdtype = $("#hdtype").val();
            if (hdtype == "EDIT") {
                ///加载参与IP
                var hdvotegroupIPs = $("#hdvotegroupIPs").val();
                if (hdvotegroupIPs != "") {
                    var model = JSON.parse(hdvotegroupIPs);
                    var clienttext = ASPxClientButtonEdit.Cast("txtjoinISIP");
                    var str = "";
                    var strGroupIDs = "";
                    for (var i = 0; i < model.length; i++) {
                        str += model[i].StrFStartIP + "～" + model[i].StrFEndIP + ",";
                        strGroupIDs += model[i].FIPGroupID + ",";
                    }
                    clienttext.SetValue(str);
                    $("#hdjoinID").val(strGroupIDs);
                }


                ///加载查看IP
                var hdlookgroupIPs = $("#hdlookgroupIPs").val();
                if (hdlookgroupIPs != "") {
                    var model = JSON.parse(hdlookgroupIPs);
                    var clienttext = ASPxClientButtonEdit.Cast("txtconISIP");
                    var str = "";
                    var strGroupIDs = "";
                    for (var i = 0; i < model.length; i++) {
                        str += model[i].StrFStartIP + "～" + model[i].StrFEndIP + ",";
                        strGroupIDs += model[i].FIPGroupID + ",";
                    }
                    clienttext.SetValue(str);
                    $("#hdconID").val(strGroupIDs);
                }

                //加载选项
                var hdreturnValue = $("#hdreturnValue").val();
                var ruleOption = ASPxClientButtonEdit.Cast("RuleOption");
                if (hdreturnValue != "") {
                    var model = JSON.parse(hdreturnValue);
                    var str = "";
                    for (var i = 0; i < model.length; i++) {
                        str += model[i].FScoreName + ",";
                    }
                    str = str.substring(0, str.lastIndexOf(","));
                    ruleOption.SetText(str);
                }

                $('.Add').each(function () {
                    a++;
                });
            }
        });


        var detailHtml = '{"FPeerReviewRuleCd":"","FRuleCls":"","FRuleNote":"","FDispSeq":0,"FScore":0,"PeerReviewRuleScoreList":null}';
        
        
        
        function addRowEntry() {
            a++;
            var tableName = "additem";
            $("#" + tableName).append("<tr class=\"Add\" id=\"" + a + "\"><td align='center' class='tdClass'><img src='" + rootPath + "/Content/images/delete.gif' width='9' height='9' style='cursor:pointer' onclick=delRow('" + tableName + "','" + a + "') /></td><td align='center' class='tdClass'><input type='text' style='width:60px' /></td><td align='center' class='tdClass'><input type='text' style='width:60px' /></td><td align='center' class='tdClass'><input type='text' style='width:600px'  /></td><td align='center' class='tdClass'><input type='text' style='width:50px' onkeyup=\"this.value=this.value.replace(/[^\\d]/g,'')\" onafterpaste=\"this.value=this.value.replace(/[^\\d]/g,'')\" value='' /></td><td align='center' class='tdClass'><input type='text' style='width:50px' onkeyup=\"this.value=this.value.replace(/[^\\d]/g,'')\" onafterpaste=\"this.value=this.value.replace(/[^\\d]/g,'')\" value='' /></td><td align='center' class='tdClass' style=\"font-size: 12px;\"><a href=\"#\" onclick=\"choose(this)\">[编辑]</a></td><td class=\"tdClass\" align=\"center\" style=\"font-size: 12px;\"></td></tr>")
        }

       
        function delRow(tableId, rowId) {
            $("#" + tableId + " tr").remove("tr[id='" + rowId + "']");
        }

        function choose(obj) {
            var PeerReviewRuleHtml = '{"FPeerReviewRuleCd":"","FPeerReviewRuleScoreCd":"","FScoreName":"","FScore":0}';
            var returnValue = $("#hdreturnValue").val();
            var hdRuleSorce = $("#hdRuleSorce").val();
            var $tr = $(obj).parent().parent();
            var FPeerReviewRuleCd = $tr.children('td:eq(1)').find(':text').val();

            var hdtype = $("#hdtype").val();
            if (hdtype == "EDIT") {
                var hdRuleSorce1 = $("#hdRuleSorce1").val();
                
                if (hdRuleSorce1 != "") {
                    var jsonRuleSorce1 = JSON.parse(hdRuleSorce1);
                    var josnRetuvalue = JSON.parse(returnValue);
                    var PeerReviewRuleList = JSON.parse("[]");
                    for (var i = 0; i < jsonRuleSorce1.length; i++) {
                        var PeerReviewRuleModel = JSON.parse(PeerReviewRuleHtml);
                        if (FPeerReviewRuleCd == jsonRuleSorce1[i]["FPeerReviewRuleCd"]) {
                            for (var j = 0; j < josnRetuvalue.length; j++) {
                                if (josnRetuvalue[j]["FPeerReviewRuleScoreCd"] == jsonRuleSorce1[i]["FPeerReviewRuleScoreCd"]) {
                                    PeerReviewRuleModel.FPeerReviewRuleCd = jsonRuleSorce1[i]["FPeerReviewRuleCd"];
                                    PeerReviewRuleModel.FPeerReviewRuleScoreCd = jsonRuleSorce1[i]["FPeerReviewRuleScoreCd"];
                                    PeerReviewRuleModel.FScoreName = josnRetuvalue[j]["FScoreName"];
                                    PeerReviewRuleModel.FScore = jsonRuleSorce1[i]["FScore"];
                                    PeerReviewRuleList.push(PeerReviewRuleModel);
                                    break;
                                } 
                            }
                               
                        }
                    }
                }
                hdRuleSorce = JSON.stringify(PeerReviewRuleList);
            }
            if (returnValue != "") {
                returnValue = escape(returnValue);
                hdRuleSorce = escape(hdRuleSorce);
                var rs = window.showModalDialog(rootPath + "/Admin/PeerReviewRule/Choose?returnValue=" + returnValue + "&hdRuleSorce=" + hdRuleSorce, "", "dialogWidth:150px;dialogHeight:300px");
                if (typeof (rs) != "undefined") {                   
                    $tr.children('td:eq(7)').html("");
                    $("#hdRuleSorce").val(rs);                   
                    var rsjson = JSON.parse(rs);
                    var strHtml = "";           
                    for (var j = 0; j < rsjson.length; j++) {
                        strHtml += rsjson[j]["FScoreName"] + ":" + rsjson[j]["FScore"] + "<br/>";
                    }

                    $tr.children('td:eq(7)').append(strHtml);
                    $tr.children('td:eq(7)').append("<input type='hidden' value='" + rs + "'/>");
                }

            } else {
                alert("请先定义评议选项！");
                return;
            }
        }

        function conIP_ValueChanged() {
            var clientchkUserObj = ASPxClientCheckBox.Cast("conISIP");
            var clienttxtUserObj = ASPxClientButtonEdit.Cast("txtconISIP");
            if (clientchkUserObj.GetChecked()) {
                clienttxtUserObj.SetEnabled(true);
            }
            else {
                clienttxtUserObj.SetEnabled(false);
                clienttxtUserObj.SetValue("");
                $("#hdlookgroupIPs").val("");
            }
        }

        function joinIP_ValueChanged() {
            var clientchkUserObj = ASPxClientCheckBox.Cast("joinISIP");
            var clienttxtUserObj = ASPxClientButtonEdit.Cast("txtjoinISIP");
            if (clientchkUserObj.GetChecked()) {
                clienttxtUserObj.SetEnabled(true);
            }
            else {
                clienttxtUserObj.SetEnabled(false);
                clienttxtUserObj.SetValue("");
                $("#hdvotegroupIPs").val("");
            }
        }
        function choosejoinIP() {
            var obj = new Object();
            obj.Value = $("#hdvotegroupIPs").val();
            var rs = window.showModalDialog(rootPath + "/Admin/Paper/ChooseJoinIP", obj, "dialogWidth:700px;dialogHeight:255px");
            if (typeof (rs) != "undefined") {
                var clienttext = ASPxClientButtonEdit.Cast("txtjoinISIP");
                var array = rs.split('|');
                var strGroupIPNames = "";
                var strGroupIDs = "";
                for (var i = 0; i < array.length; i++) {
                    if (i % 2 == 0) {
                        if (i + 1 == array.length) {
                            strGroupIPNames += array[i];
                        } else {
                            strGroupIPNames += array[i] + ",";
                        }
                    } else {
                        strGroupIDs += array[i] + ",";

                    }
                }
                clienttext.SetValue(strGroupIPNames);
                $("#hdjoinID").val(strGroupIDs);
                //$("#hdvotegroupIPs").val(strGroupIPNames);                                     
            }
        }

        function chooseconIP() {
            var obj = new Object();
            obj.Value = $("#hdlookgroupIPs").val();
            var rs = window.showModalDialog(rootPath + "/Admin/Paper/ChooseJoinIP", obj, "dialogWidth:700px;dialogHeight:255px");
            if (typeof (rs) != "undefined") {
                var clienttext = ASPxClientButtonEdit.Cast("txtconISIP");
                var array = rs.split('|');
                var strGroupIPNames = "";
                var strGroupIDs = "";
                for (var i = 0; i < array.length; i++) {
                    if (i % 2 == 0) {
                        if (i + 1 == array.length) {
                            strGroupIPNames += array[i];
                        } else {
                            strGroupIPNames += array[i] + ",";
                        }
                    } else {
                        strGroupIDs += array[i] + ",";

                    }
                }
                clienttext.SetValue(strGroupIPNames);
                $("#hdconID").val(strGroupIDs)
                //$("#hdlookgroupIPs").val(strGroupIPNames);
            }
        }
        var ISNULL = true;
        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnSave":
                    {
                        //保存                       
                        $("#hdresult").val("");
                        var FTitle = ASPxClientTextBox.Cast("FTitle");
                        if (FTitle.GetText() == "") {
                            alert("主题名称不能为空！")
                            return;
                        }
                        var FBeginDate = ASPxClientDateEdit.Cast("FBeginDate");
                        if (FBeginDate.GetText() == "") {
                            alert("开始日期不能为空！")
                            return;
                        }
                        var FEndDate = ASPxClientDateEdit.Cast("FEndDate");
                        if (FEndDate.GetText() == "") {
                            alert("结束日期不能为空！")
                            return;
                        }
                        //结束日期，开始日期比较
                        duibi(FBeginDate.GetText(), FEndDate.GetText());
                        //评议一旦有结果就不能设置评议选项
                        var hdvisible = $("#hdvisible").val();
                        if (hdvisible == "false") {
                            if ($('.Add').length <= 0) {
                                alert("请设置选择评议选项");
                                return;
                            } else {

                                var List = JSON.parse("[]");
                                var PeerReviewRuleScoreList = JSON.parse("[]");

                                $('.Add').each(function () {
                                    var detailModel = JSON.parse(detailHtml);
                                    if ($.trim($(this).find('td').eq(1).find(':text').val()) != "") {
                                        detailModel.FPeerReviewRuleCd = $.trim($(this).find('td').eq(1).find(':text').val());
                                    } else {
                                        alert("细则编号不能为空！");
                                        ISNULL = false;
                                        return false;
                                    }
                                    if ($.trim($(this).find('td').eq(2).find(':text').val()) != "") {
                                        detailModel.FRuleCls = $.trim($(this).find('td').eq(2).find(':text').val());
                                    } else {
                                        alert("细则类别不能为空！");
                                        ISNULL = false;
                                        return false;
                                    }
                                    if ($.trim($(this).find('td').eq(3).find(':text').val()) != "") {
                                        detailModel.FRuleNote = $.trim($(this).find('td').eq(3).find(':text').val());
                                    } else {
                                        alert("细则条款不能为空！");
                                        ISNULL = false;
                                        return;
                                    }
                                    if ($.trim($(this).find('td').eq(4).find(':text').val()) != "") {
                                        detailModel.FScore = $.trim($(this).find('td').eq(4).find(':text').val());
                                    } else {
                                        alert("细则分值不能为空！");
                                        ISNULL = false;
                                        return false;
                                    }
                                    if ($.trim($(this).find('td').eq(5).find(':text').val()) != "") {
                                        detailModel.FDispSeq = $.trim($(this).find('td').eq(5).find(':text').val());
                                    } else {
                                        alert("细则排序不能为空！");
                                        ISNULL = false;
                                        return false;
                                    }
                                    if ($.trim($(this).find('td').eq(7).find(':hidden').val()) != "") {
                                        detailModel.PeerReviewRuleScoreList = JSON.parse($.trim($(this).find('td').eq(7).find(':hidden').val()));
                                    } else {
                                        var peerReviewRuleCd = $.trim($(this).find('td').eq(1).find(':text').val());
                                        alert("编号" + peerReviewRuleCd + "细则选项不能为空！");
                                        ISNULL = false;
                                        return false;
                                    }

//                                    if (detailModel.PeerReviewRuleScoreList != "" && detailModel.FScore != "") {
//                                        for (var i = 0; i < detailModel.PeerReviewRuleScoreList.length; i++) {
//                                            var score1 = parseFloat(detailModel.FScore);
//                                            var score2 = parseFloat(detailModel.PeerReviewRuleScoreList[i]["FScore"])
//                                            if (score1 < score2) {
//                                                alert("细则分值不能小于选项中的最大分值，请修改");
//                                                ISNULL = false;
//                                                return false;
//                                            }
//                                        }
//                                    }

                                    List.push(detailModel);

                                });

                                if (!ISNULL) {
                                    return;
                                }

                                var ListStr = "";
                                if (List.length > 0) {

                                    ListStr = JSON.stringify(List);
                                }

                                $("#hdresult").val(ListStr);
                            }
                        }
                        //保存
                        form1.submit();
                        break;
                    }
                case "btnDelete":
                    {
                        //返回桌面
                        window.location.href = rootPath + "/Index/Content";
                        break;
                    }
                case "btnCopyURL":
                    {
                        //复制地址
                        copy();
                        break;
                    }
            }
        }

        function copy() {
            var textObjValue = rootPath + "/Admin/PeerReviewScore";
            window.clipboardData.setData("Text", textObjValue);
            alert("已经复制到剪贴板！");
        }


         function duibi(a, b) {
            var arr = a.split("-");
            var starttime = new Date(arr[0], arr[1], arr[2]);
            var starttimes = starttime.getTime();

            var arrs = b.split("-");
            var lktime = new Date(arrs[0], arrs[1], arrs[2]);
            var lktimes = lktime.getTime();

            if (starttimes >= lktimes) {

                alert('结束日期大于开始日期，请检查');
                ISNULL = false;
            }
            else
                ISNULL = true;
        }



        function chooseRuleOption() {
            var str = $("#hdreturnValue").val();
            var ruleOption = ASPxClientButtonEdit.Cast("RuleOption");
            str = escape(str);
            var returnValue = window.showModalDialog(rootPath + "/Admin/PeerReviewRule/ChooseRuleOption?json=" + str, "", "dialogWidth:400px;dialogHeight:255px");
            if (typeof (returnValue) != "undefined") {
                if (returnValue != "") {
                    $("#hdreturnValue").val(returnValue);
                    var List = JSON.parse(returnValue);
                    var name = "";
                    for (var i = 0; i < List.length; i++) {
                        name += List[i]["FScoreName"] + ",";
                    }
                    name = name.substring(0, name.lastIndexOf(","));
                    ruleOption.SetText(name);

                    var text = $("#hdRuleSorce1").val();

                    $('.Add').each(function () {
                        var FPeerReviewRuleCd = $(this).find('td:eq(1)').find(':text').val();
                        $(this).find('td').eq(7).html("");
                        var josnText = JSON.parse(text);
                        var josnreturnValue = JSON.parse(returnValue);
                        var strHtml = "";
                        var count = 0;
                        for (var i = 0; i < josnText.length; i++) {
                            if (FPeerReviewRuleCd == josnText[i]["FPeerReviewRuleCd"]) {
                                for (var j = 0; j < josnreturnValue.length; j++) {
                                    if (josnreturnValue[j]["FPeerReviewRuleScoreCd"] == josnText[i]["FPeerReviewRuleScoreCd"]) {
                                        strHtml += josnreturnValue[j]["FScoreName"] + ":" + josnText[i]["FScore"] + "<br/>";
                                        count++;
                                    }
                                }
                            }
                        }

                        if (count < josnreturnValue.length) {
                            $(this).find('td').eq(7).html("");
                            $(this).find('td').eq(7).append("");
                        }
                        else {
                            $(this).find('td').eq(7).html(strHtml);
                            $(this).find('td').eq(7).append("<input type='hidden' value='" + returnValue + "'/>");
                        }
                    });

                } else {
                    ruleOption.SetText(returnValue);
                }
            }
        }

    </script>
</head>
<body>
@using (Html.BeginForm("Save", "PeerReviewRule", FormMethod.Post, new { id = "form1" }))
{
      <div class="floatToolMenu" id="toolMenu">
        @Html.DevExpress().Menu(settings =>
   {
       settings.Name = "toolBarMenu";
       settings.ItemAutoWidth = false;
       settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
       settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
       settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       settings.Items.Add(item =>
       {
           item.Name = "btnSave";
           item.Text = "保存";
           item.ItemStyle.ForeColor = System.Drawing.Color.Red;
           item.ClientEnabled = true;
           item.Image.Url = Url.Content("~/Content/ControlImages/filesave.png");

       });
       settings.Items.Add(item =>
       {
           item.Name = "btnDelete";
           item.Text = "取消";
           item.ItemStyle.ForeColor = System.Drawing.Color.Red;
           item.ClientEnabled = true;
           item.Image.Url = Url.Content("~/Content/ControlImages/cancel.png");

       });
       settings.Items.Add(item =>
       {
           item.Name = "btnCopyURL";
           item.Text = "获取地址";
           item.ItemStyle.ForeColor = System.Drawing.Color.Red;
           item.ClientEnabled = true;
           item.Image.Url = Url.Content("~/Content/ControlImages/copy.png");

       });
       settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
       settings.ItemLinkMode = ItemLinkMode.ContentBounds;
   }).GetHtml()
    </div> 
    <div>
        <table width="50%" class="tableForm" border="1">
            <tr height="25">
                <td style="width: 15%;padding-right:5px" class="tdClass" align="right">@Html.DevExpress().Label(s => { s.Text = "评议标题:"; }).GetHtml()</td>
                <td colspan="3" class="tdClass">
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FTitle";
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
                   settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
                   settings.Text = Model.FTitle;
                   settings.Enabled = true;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
               </td>
            </tr>
            <tr  height="25">
               <td style="width: 15%;padding-right:5px" class="tdClass" align="right">
            @Html.DevExpress().CheckBox(
                    settings =>
                    {
                        settings.Name = "joinISIP";
                        settings.Text = "控制评议参与IP:";
                        settings.Checked = Model.FIsVoteIPControl == "Y" ? true : false;
                        settings.Properties.ClientSideEvents.Init = "function(s,e){joinIP_ValueChanged()}";
                        settings.Properties.ClientSideEvents.ValueChanged = "function(s,e){joinIP_ValueChanged()}";
                    }).GetHtml()
            </td>  
                <td style="width: 85%" class="tdClass" colspan="3">
                    @Html.DevExpress().ButtonEdit(settings =>
               {
                   settings.Name = "txtjoinISIP";
                   settings.ReadOnly = true;
                   settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
                   settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
                   settings.Properties.Buttons.Add("选择");
                   settings.Properties.ClientSideEvents.ButtonClick = "function(s,e){choosejoinIP()}";
               }).GetHtml()
                </td>
             </tr>
             <tr  height="25">
                <td style="width: 15%;padding-right:5px" class="tdClass" align="right">
             
                 @Html.DevExpress().CheckBox(
                    settings =>
                    {
                        settings.Name = "conISIP";
                        settings.Text = "控制评议查看IP:";
                        settings.Checked = Model.FIsLookIPControl == "Y" ? true : false;
                        settings.Properties.ClientSideEvents.Init = "function(s,e){conIP_ValueChanged()}";
                        settings.Properties.ClientSideEvents.ValueChanged = "function(s,e){conIP_ValueChanged()}";
                    }).GetHtml()
                    
                </td>        
                <td style="width: 85%" class="tdClass" colspan="3">
                @Html.DevExpress().ButtonEdit(settings =>
           {
               settings.Name = "txtconISIP";
               settings.ReadOnly = true;
               settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
               settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
               settings.Properties.Buttons.Add("选择");
               settings.Properties.ClientSideEvents.ButtonClick = "function(s,e){chooseconIP()}";
           }).GetHtml()
                </td>
             </tr>
              <tr  height="25">
                <td style="width: 15%;padding-right:5px" class="tdClass" align="right">
             
                 @Html.DevExpress().CheckBox(
                    settings =>
                    {
                        settings.Name = "FIsSelectAll";
                        settings.Text = "开启全选按钮:";
                        settings.Checked = Model.FIsSelectAll == "Y" ? true : false;
                    }).GetHtml()
                    
                </td>

             </tr>
             <tr height="25">
                <td style="width: 15%;padding-right:5px" class="tdClass" align="right">@Html.DevExpress().Label(s => { s.Text = "评议日期范围:"; }).GetHtml()</td>
                <td style="width: 15%" class="tdClass" >
                    @Html.DevExpress().DateEdit(settings =>
               {
                   settings.Name = "FBeginDate";
                   settings.Properties.NullText = "";
                   settings.Properties.DisplayFormatString = "yyyy-MM-dd";
                   settings.Properties.EditFormatString = "yyyy-MM-dd";
                   settings.Date = Model.FBeginDate;

               }).GetHtml()             
                </td>
                <td style="width:5%" class="tdClass"  align="center"> 一一</td>
                <td class="tdClass">
                 @Html.DevExpress().DateEdit(settings =>
            {
                settings.Name = "FEndDate";
                settings.Properties.NullText = "";
                settings.Properties.DisplayFormatString = "yyyy-MM-dd";
                settings.Properties.EditFormatString = "yyyy-MM-dd";
                settings.Date = Model.FEndDate;

            }).GetHtml()
                </td>
             </tr>
             <tr height="25">
                <td style="width: 15%;padding-right:5px" class="tdClass" align="right" >@Html.DevExpress().Label(s => { s.Text = "评议选项:"; }).GetHtml()</td>
                <td style="width: 85%" class="tdClass" colspan="3">
                @Html.DevExpress().ButtonEdit(settings =>
           {
               settings.Name = "RuleOption";
               settings.ReadOnly = true;
               settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
               settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
               settings.Properties.Buttons.Add("选择");
               settings.Properties.ClientSideEvents.ButtonClick = "function(s,e){chooseRuleOption()}";
           }).GetHtml()
                </td>
             </tr>           
        </table>    
    </div>
    <div id="div2">
        <table width="100%" class="tableForm" border="1" style="margin-top:15px;">
            <tr height="25"><td class="tdClass" align="center">@Html.DevExpress().Label(s => { s.Text = "评议细则"; }).GetHtml()</td></tr>
             <tr height="25">             
                <td colspan="4" class="tdClass">
                    <table width="99%" class="tableForm" id="additem">
                        
                        <tr height="25">
                            <td width="10%" class="tdClass" height="30" style =" text-align:center">
                            <img src="@Url.Content("~/Content/images/add.gif")" style="cursor:pointer;font-size: 12px;" onclick="addRowEntry()"/>
                            &nbsp;@Html.DevExpress().Label(settings => { settings.Text = "操作"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</td>
                            <td width="10%" class="tdClass" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "编号"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</td>
                            <td width="10%" class="tdClass" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "类别"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</td>
                            <td class="tdClass" style ="text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "条款"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</td>
                            <td width="6%" class="tdClass" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "分值"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</td>
                            <td width="6%" class="tdClass" style =" text-align:center">@Html.DevExpress().Label(settings => { settings.Text = "显示顺序"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</td>
                            <td width="18%" class="tdClass" style =" text-align:center" colspan="2">@Html.DevExpress().Label(settings => { settings.Text = "选项"; settings.Properties.Style.Font.Bold = true; }).GetHtml()</td>
                        </tr>
                        @Html.Raw(ViewData["table"].ToString())
                    </table>
                </td>
             </tr>  
        </table>    
    </div>
    <div id="div3" style="display:none">
        <table align="center" width="99%" style="margin-top:15px;">
            <tr>
                <td style="color: #CC0000;font-weight: bold;font-size: 14px;text-align:center;">已有评分记录无法修改评议选项</td>
            </tr>
        </table>
    </div>
    @Html.Hidden("hdjoinID", ViewData["joinGroupID"])
    @Html.Hidden("hdconID", ViewData["conGroupID"])

    @Html.Hidden("hdvotegroupIPs", ViewData["votegroupIPs"])
    @Html.Hidden("hdlookgroupIPs", ViewData["lookgroupIPs"])   
    
    @Html.Hidden("hdtype", ViewData["type"])
    @Html.Hidden("hdresult", "")
    @Html.Hidden("hdreturnValue", ViewData["returnValue"])
    @Html.Hidden("hdPeerReviewID", ViewData["peerReviewID"])
    @Html.Hidden("hdRuleSorce", ViewData["RuleSorce"])
    @Html.Hidden("hdRuleSorce1", ViewData["RuleSorce"])

    @Html.Hidden("hidMessage", ViewData["message"])
    @Html.Hidden("hdvisible", ViewData["visible"])

}    
</body>
</html>
